package ch.uzh.ifi.seal.ssqa.model.diagram.edit.policies;

import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;

import ch.uzh.ifi.seal.ssqa.model.diagram.edit.commands.DiagramComposite2CreateCommand;
import ch.uzh.ifi.seal.ssqa.model.diagram.edit.commands.DiagramFolder2CreateCommand;
import ch.uzh.ifi.seal.ssqa.model.diagram.edit.commands.DiagramModule2CreateCommand;
import ch.uzh.ifi.seal.ssqa.model.diagram.providers.SsqaElementTypes;

/**
 * @generated
 */
public class DiagramFolderDiagramFolderChildrenCompartment2ItemSemanticEditPolicy
		extends SsqaBaseItemSemanticEditPolicy {

	/**
	 * @generated
	 */
	public DiagramFolderDiagramFolderChildrenCompartment2ItemSemanticEditPolicy() {
		super(SsqaElementTypes.DiagramFolder_3001);
	}

	/**
	 * @generated
	 */
	protected Command getCreateCommand(CreateElementRequest req) {
		if (SsqaElementTypes.DiagramFolder_3001 == req.getElementType()) {
			return getGEFWrapper(new DiagramFolder2CreateCommand(req));
		}
		if (SsqaElementTypes.DiagramModule_3002 == req.getElementType()) {
			return getGEFWrapper(new DiagramModule2CreateCommand(req));
		}
		if (SsqaElementTypes.DiagramComposite_3003 == req.getElementType()) {
			return getGEFWrapper(new DiagramComposite2CreateCommand(req));
		}
		return super.getCreateCommand(req);
	}

}
